package com.fun.feifun.modules.business.model.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
import lombok.experimental.Accessors;

import java.io.Serializable;


@Data
public class BusinessGoodsPage implements Serializable  {
    @ApiModelProperty(value = "商品编码")
    private String code;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "是否有效 0是未上架 1是上架")
    private Boolean isValid;

    @ApiModelProperty(value = "类型")
    private String type;

    @ApiModelProperty(value = "运营商")
    private String operators;

    @ApiModelProperty(value = "页码")
    private int page=1;

    @ApiModelProperty(value = "分页数量")
    private int size=10;

    @ApiModelProperty(value = "排序字段")
    private String sort="id";


    public int getSize() {
        if(size==0)
            return 10;
        return size;
    }
    public int getPage() {
        if(page==0)
            return 1;
        return page;
    }
}
